home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Deutsche Edition 1
/
Deutsche Edition 1.iso
/
amok
/
amok_lha
/
amok15.lha
/
Seafarers_Manual
/
Source
/
Fathoms.mod
< prev
next >
Wrap
Text File
|
1993-08-15
|
635b
|
29 lines
MODULE Fathoms; (* Convert fathoms to inches *)
(* From the book "Modula-2 A Seafarer's Manual and Shipyard Guide" *)
(* Page 22 adapted "Amiga M2Modula-2" 21 Feb 1988 *)
FROM InOut IMPORT WriteLn,
WriteString,
WriteInt,
ReadInt;
CONST
FeetInFathom = 6;
InchesInFoot = 12;
InchesInFathom = FeetInFathom * InchesInFoot;
VAR
NumFathoms,
TotalInches : INTEGER;
BEGIN
WriteString ("Enter number of fathoms: ");
ReadInt (NumFathoms);
TotalInches := NumFathoms * InchesInFathom;
WriteLn;
WriteInt (TotalInches,5);
WriteLn;
END Fathoms.